package router

import (
	"car-order-pro/handler"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.POST("/login", handler.Login)
	r.POST("/userRoleAdd", handler.UserRoleAdd)
	r.POST("/roleNodeAdd", handler.RoleNodeAdd)
	r.GET("/userRoleList", handler.UserRoleList)
	r.GET("/RoleNodeList", handler.RoleNodeList)
	r.POST("/CarAdd", handler.CarAdd)
	r.POST("/CarOrder", handler.CarOrder)
	r.GET("CarOrderList", handler.CarOrderList)
	r.GET("CarOrderDetail", handler.CarOrderDetail)
	return r
}
